Skip to content

feat(docs): adopt txn2 design system for docs site#77

Merged
cjimti merged 2 commits intomasterfrom
feat/docs-design-system
Apr 27, 2026
Merged

feat(docs): adopt txn2 design system for docs site#77
cjimti merged 2 commits intomasterfrom
feat/docs-design-system

Conversation

@cjimti
Copy link
Copy Markdown
Member

@cjimti cjimti commented Apr 27, 2026

Summary

  • Re-skin the docs site to match the txn2 visual identity used by sister project kubefwd. Token-alignment level adoption: keep MkDocs Material chrome, replace the visual layer via extra.css and a custom homepage template.
  • New docs/overrides/home.html provides the full-bleed homepage (rail, hero, two flagship cards for the CLI and the Go library, 7-row stack list, coda, custom home-footer). Inner pages still render through Material with the slate scheme remapped to upstream tokens.
  • New DESIGN.md records the adoption decisions and defers to upstream txn2/www DESIGN.md and tokens.json as the single source of truth. Includes a brief recap of the MkDocs Material learnings carried over from kubefwd.

What changed

  • mkdocs.yml: single slate palette, font: false so CSS loads the upstream Google Fonts URL with trimmed axes (Fraunces ital + opsz/wght, Instrument Sans roman, JetBrains Mono roman).
  • docs/overrides/main.html: load the upstream Google Fonts via a single <link>, expand OG and Twitter meta.
  • docs/overrides/home.html (new): full homepage template with rail, hero (txeh / /etc/hosts / management.), CLI demo card with real `txeh add` / `txeh list ip` / `txeh remove host` invocations, library demo card with the `NewHostsDefault` / `AddHost` / `Save` path, stack list of features linking to real anchors, coda, home-footer with a `txn2 / org` panel.
  • docs/overrides/404.html: rewrite in the design voice.
  • docs/stylesheets/extra.css: full port of kubefwd's design system stylesheet (1,536 lines: tokens, blueprint grid, grain/vignette overlays, rail, hero, flagship, terminal, stack, coda, home-footer, plus a complete [data-md-color-scheme=\"slate\"] Material chrome restyle for inner pages, including Mermaid theme variables, code blocks, admonitions, tabbed content, and tables).
  • docs/index.md: reduce to a stub with template: home.html.
  • DESIGN.md (new): local adoption record. References upstream as canonical.

Test plan

  • mkdocs build --strict builds clean
  • Homepage renders rail, hero, both flagship cards, terminal blocks, 7 stack rows, coda, home-footer
  • Inner pages (e.g. /cli/, /library/) inherit the slate scheme and the txn2 tokens
  • No browser console errors on homepage load
  • No em-dashes (U+2014) or en-dashes (U+2013) in any new files
  • Live UTC clock guarded against navigation.instant re-registration via window.__txehClock sentinel
  • Verify GitHub Pages deploy renders correctly after merge

Re-skin the docs site to match the txn2 visual identity used by
sister project kubefwd. Token-alignment level adoption: keep MkDocs
Material chrome, replace the visual layer via extra.css and a custom
homepage template.

- new DESIGN.md records adoption decisions and defers to upstream
  txn2/www DESIGN.md and tokens.json as the source of truth
- new docs/overrides/home.html: rail, hero, two flagship cards
  (CLI demo, Go library demo), 7-row stack list, coda, home-footer
- mkdocs.yml: single slate palette, font: false so CSS loads the
  upstream Google Fonts URL with trimmed axes
- main.html: load Fraunces, Instrument Sans, JetBrains Mono; expand
  OG and Twitter meta
- extra.css: full port of kubefwd's design system stylesheet
  (1,536 lines: tokens, blueprint grid, grain/vignette, rail, hero,
  flagship, terminal, stack, coda, home-footer, plus a complete
  Material chrome restyle for inner pages)
- 404.html: rewrite with the design voice
- index.md: reduce to a stub pointing at home.html
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.51%. Comparing base (872853a) to head (ec2b905).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   88.96%   89.51%   +0.55%     
==========================================
  Files          18       18              
  Lines         761      706      -55     
==========================================
- Hits          677      632      -45     
+ Misses         74       64      -10     
  Partials       10       10              

see 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- home.html: stack list "in-memory mode" linked to a non-existent
  anchor (library/#in-memory-mode). The actual heading slug on
  library.md is from-a-string-in-memory. Fixed.
- home.html, mkdocs.yml: copyright start year and est. stamp said
  2018, but the first commit on master is 2019-02-15. Corrected
  the rail stamp to "est. 2019" and the copyright in both home
  footer and mkdocs.yml to 2019-2026.
- home.html: rail and hero version stamp said "v1.x". Pinned to
  the actual current release v1.8.0 (verified via gh api).
- main.html: skip-to-content link only existed on the homepage
  template. Added a header-block override so every inner page gets
  one too, with a focusable #main anchor injected at the top of
  the content area to give the skiplink a target. Material's
  <main> element has no id by default.
@cjimti cjimti merged commit ee8d9e0 into master Apr 27, 2026
9 checks passed
@cjimti cjimti deleted the feat/docs-design-system branch April 27, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant